<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>固定定位</title>
		<style>
			div {
				width: 200px;
				height: 200px;
			}
			.div1 {
				background-color: red;
				/* 脱流、上浮一层并释放空间位置 */
				/* 相当于绝对定位固定位置，元素不随内容滚动 */
				position: fixed;
				right: 0px;
				top: 100px;
			}
			.div2 {
				background-color: green;
			}
			.div3 {
				background-color: blue;
			}
		</style>
	</head>
	<body>
		<div class="div1"></div>
		<div class="div2"></div>
		<div class="div3"></div>
		<p style="height: 1000px;"></p>
		<p>到底啦</p>
	</body>
</html>